import axios from "axios";
//查询所有员工信息
export const getEmployee = (page,size)=>{
   return  axios({
        url:"/employee/findList",
        method:'get',
        params:{
            "page":page,
            "size":size
        }
    })
}
//模糊查询员工信息
export const getEmployeeByNameLike = (page,size,keyWorld)=>{
    return  axios({
        url:"/employee/findByNameLike",
        method:'get',
        params:{
            "page":page,
            "size":size,
            "name":keyWorld
        }
    })
}
//根据员工id查找
export const getEmployeeById = (employeeId)=>{
    return axios.get('/employee/findById?employeeId='+employeeId);
}
//添加员工信息
export const  addEmployee = (employee)=>{
    return axios({
        method:"post",
        url:"/employee/add",
        data:employee
    })
}
//修改员工数据
export const updateEmployee = (employee)=>{
    return axios({url:"/employee/update",method:'put',data:employee})
}
//批量删除员工数据
export const deleteEmployeeBatch = (ids)=>{
    return axios({
        url:'/employee/deleteBatch',
        data:ids,
        method:'post'
    })
}

//导出全部员工数据
export const exportAllEmployeeData = ()=>{
    return axios({
        url:"/employee/exportAllData",
        responseType: 'blob',
        method:'get',
    })
}